File manager - Edit - /home/autoph/public_html/projects/Rating-AutoHub/public/css/Notifications.zip
Back
PK 3M�ZJ�P P Overtime.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeOvertime; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class Overtime extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeOvertime $overtime) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail','database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.overtime', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Overtime Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; $isApprover = false; if($this->overtime->validated == 1){ $title = "Your overtime application has been received and validated by HR"; }else if($this->overtime->validated == 99){ $title = "Your overtime application has been denied by HR"; }else if($this->overtime->status == 2){ $title = "Your overtime application has been approved"; }else if($this->overtime->status == 99){ $title = "Your overtime application has been denied "; }else{ $title = $this->overtime->employee->firstname . ' ' . $this->overtime->employee->lastname." Submitted Overtime Application"; $isApprover = true; } return [ 'overtime_id' => $this->overtime->id, 'status' => $this->overtime->status, 'approved_at' => $this->overtime->approved_at, 'message' => $this->message, 'title' => $title, 'url' => $isApprover ? 'attendance/overtime-approval' : 'attendance/overtime', 'created_by' => $this->overtime->employee_id ]; } private function generateMessage(): string { $fullname = $this->overtime->employee->firstname.' '.$this->overtime->employee->lastname; $date_from = $this->overtime->date_from; $date_to = $this->overtime->date_to; $from_time = $this->overtime->from_time; $to_time = $this->overtime->to_time; $created_at = Carbon::parse($this->overtime->created_at)->setTimezone('Asia/Shanghai'); switch ($this->overtime->status) { case 1: case 0: return $fullname.' filed overtime application dated "'.$date_from. '" to "'. $date_to.'" time from "'.$from_time.'" to "'.$to_time.'" for your validation.'; case 2: if($this->overtime->validated == 1){ return 'Your overtime application dated "'.$date_from. '" to "'. $date_to.'" time from "'.$from_time.'" to "'.$to_time.'" Hours has been received and validated by HR.'; }else if($this->overtime->validated == 99){ return 'Your overtime application dated "'.$date_from. '" to "'. $date_to.'" time from "'.$from_time.'" to "'.$to_time.'" Hours has been denied by HR.'; }else{ return 'Your overtime application dated "'.$date_from. '" to "'. $date_to.'" time from "'.$from_time.'" to "'.$to_time.'" has been approved.'; } case 99: return 'Your overtime application dated "'.$date_from. '" to "'. $date_to.'" time from "'.$from_time.'" to "'.$to_time.'" has been denied.'; default: return 'Unknown status.'; } } } PK 3M�Z�$ e� � BiometricConnection.phpnu �[��� <?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class BiometricConnection extends Notification { use Queueable; private array $biometricNotification; /** * Create a new notification instance. */ public function __construct(array $biometricNotification) { $this->biometricNotification = $biometricNotification; } /** * Get the notification's delivery channels. */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.biometric', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), 'msg' => $this->generateMessage(), 'notifiable' => $notifiable, ]) ->subject('Biometric Notification'); } /** * Get the array representation of the notification. */ public function toArray(object $notifiable): array { return [ 'success' => $this->biometricNotification['success'] ?? null, 'failure' => $this->biometricNotification['failure'] ?? null, ]; } /** * Generate the notification message. */ private function generateMessage(): string { $success = $this->biometricNotification['success'] ?? []; $failure = $this->biometricNotification['failure'] ?? []; $message = "<h3>Biometric Operation Report Dated: ".date('Y-m-d')."</h3>"; // Success Section $message .= "<h4 style='color: green;'>Success:</h4>"; if (!empty($success)) { $message .= "<ul>"; foreach ($success as $successData) { $deviceName = $successData['device_name'] ?? 'Unknown Device'; $ipAddress = $successData['ipaddress'] ?? 'Unknown IP'; $message .= "<li>Device: <b>$deviceName</b> | IP: <b>$ipAddress</b></li>"; } $message .= "</ul>"; } else { $message .= "<p>No successful operations reported.</p>"; } // Failure Section $message .= "<h4 style='color: red;'>Failed:</h4>"; if (!empty($failure)) { $message .= "<ul>"; foreach ($failure as $failureData) { $deviceName = $failureData['device_name'] ?? 'Unknown Device'; $ipAddress = $failureData['ipaddress'] ?? 'Unknown IP'; $message .= "<li>Device: <b>$deviceName</b> | IP: <b>$ipAddress</b></li>"; } $message .= "</ul>"; } else { $message .= "<p>No failed operations reported.</p>"; } return $message; } } PK 3M�Z��� � JobApplication.phpnu �[��� <?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class JobApplication extends Notification { use Queueable; private string $message; public $applicant; /** * Create a new notification instance. */ public function __construct($applicant) { $this->applicant = $applicant; $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.jobapplication', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, ]) ->subject('Job Application Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ // ]; } private function generateMessage(): string { $fullname = $this->applicant->firstname . ' ' . $this->applicant->lastname; $job_title = $this->applicant->position; $cover_letter = $this->applicant->cover_letter; return "$fullname submitted an application for the position of \"$job_title\". Applicant Covert Letter: $cover_letter"; } } PK 3M�Z� 东 � TimeAdjustment.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeTimeAdjustment; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class TimeAdjustment extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeTimeAdjustment $timeAdjustment) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail','database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.time_adjustment', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Time Adjustment Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; $isApprover = false; if($this->timeAdjustment->validated == 1){ $title = "Your time adjustment application has been received and validated by HR"; }else if($this->timeAdjustment->validated == 99){ $title = "Your time adjustment application has been denied by HR"; }else if($this->timeAdjustment->status == 2){ $title = "Your time adjustment application has been approved"; }else if($this->timeAdjustment->status == 99){ $title = "Your time adjustment application has been denied "; }else{ $title = $this->timeAdjustment->employee->firstname . ' ' . $this->timeAdjustment->employee->lastname." Submitted Time Adjustment Application"; $isApprover = true; } return [ 'time_adjustment_id' => $this->timeAdjustment->id, 'status' => $this->timeAdjustment->status, 'approved_at' => $this->timeAdjustment->approved_at, 'message' => $this->message, 'title' => $title, 'url' => $isApprover ? 'attendance/time-adjustment-approval' : 'attendance/time-adjustment', 'created_by' => $this->timeAdjustment->employee_id ]; } private function generateMessage(): string { $fullname = $this->timeAdjustment->employee->firstname.' '.$this->timeAdjustment->employee->lastname; $date = $this->timeAdjustment->date; $from_time = $this->timeAdjustment->from_time; $to_time = $this->timeAdjustment->to_time; $created_at = Carbon::parse($this->timeAdjustment->created_at)->setTimezone('Asia/Shanghai'); switch ($this->timeAdjustment->status) { case 1: case 0: return $fullname.' filed time adjustment application dated "'.$date. '" for your validation.'; case 2: if($this->timeAdjustment->validated == 1){ return 'Your time adjustment application dated "'.$date. '" has been received and validated by HR.'; }else if($this->timeAdjustment->validated == 99){ return 'Your time adjustment application dated "'.$date. '" has been denied by HR.'; }else{ return 'Your time adjustment application dated "'.$date. '" has been approved.'; } case 99: return 'Your time adjustment application dated "'.$date. '" has been denied.'; default: return 'Unknown status.'; } } } PK 3M�Zx�8�� � Mrf.phpnu �[��� <?php namespace App\Notifications; use App\Models\Mrf as ModelsMrf; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Crypt; class Mrf extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private ModelsMrf $mrf ) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { $notifiable->url = 'recruitment/mrf'; $notifiable->encrypted_id = Crypt::encrypt($notifiable->id); // dd($notifiable); return (new MailMessage) ->view('emails.mrf', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('MRF Request'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ 'mrf_id' => $this->mrf->id, 'status' => $this->mrf->status, 'approved_at' => $this->mrf->approved_at, 'message' => $this->message, 'title' => ($this->mrf->status == 3) ? "Your MRF request has been approved" : (($this->mrf->status == 99) ? "Your MRF request has been denied" : $this->mrf->employee->firstname . ' ' . $this->mrf->employee->lastname." Submitted MRF Application" ), 'url' => 'recruitment/mrf', 'created_by' => $this->mrf->employee_id ]; } private function generateMessage(): string { $fullname = $this->mrf->employee->firstname . ' ' . $this->mrf->employee->lastname; switch ($this->mrf->status) { case 0: case 1: return $fullname.' submitted MRF for your checking'; case 3: return 'Your requested MRF has been approved'; case 2: return "MRF has been submitted for your checking."; case 99: return "Your MRF request has been denied."; default: return 'Unknown status.'; } } } PK 3M�Zt�)1w w ChangeSchedule.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeChangeSchedule; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class ChangeSchedule extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeChangeSchedule $change_schedule) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail','database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.change_schedule', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Change Schedule Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; $isApprover = false; if($this->change_schedule->validated == 1){ $title = "Your change schedule application has been received and validated by HR"; }else if($this->change_schedule->validated == 99){ $title = "Your change schedule application has been denied by HR"; }else if($this->change_schedule->status == 2){ $title = "Your change schedule application has been approved"; }else if($this->change_schedule->status == 99){ $title = "Your change schedule application has been denied "; }else{ $title = $this->change_schedule->employee->firstname . ' ' . $this->change_schedule->employee->lastname." Submitted Leave Application"; $isApprover = true; } return [ 'change_schedule_id' => $this->change_schedule->id, 'status' => $this->change_schedule->status, 'approved_at' => $this->change_schedule->approved_at, 'message' => $this->message, 'title' => $title, 'url' => $isApprover ? 'attendance/change-schedule-approval' : 'attendance/change-schedule', 'created_by' => $this->change_schedule->employee_id ]; } private function generateMessage(): string { $fullname = $this->change_schedule->employee->firstname.' '.$this->change_schedule->employee->lastname; $date = $this->change_schedule->date; $from_time = $this->change_schedule->from_time; $to_time = $this->change_schedule->to_time; $created_at = Carbon::parse($this->change_schedule->created_at)->setTimezone('Asia/Shanghai'); switch ($this->change_schedule->status) { case 1: case 0: return $fullname.' filed change schedule application dated "'.$date. '" from "'.$from_time.'" to "'.$to_time.'" for your validation.'; case 2: if($this->change_schedule->validated == 1){ return 'Your change schedule application dated "'.$date. '" from "'.$from_time.'" to "'.$to_time.'" has been received and validated by HR.'; }else if($this->change_schedule->validated == 99){ return 'Your change schedule application dated "'.$date. '" from "'.$from_time.'" to "'.$to_time.'" has been denied by HR.'; }else{ return 'Your change schedule application dated "'.$date. '" from "'.$from_time.'" to "'.$to_time.'" has been approved.'; } case 99: return 'Your change schedule application dated "'.$date. '" from "'.$from_time.'" to "'.$to_time.'" has been denied.'; default: return 'Unknown status.'; } } } PK 3M�Z�00�6 6 Leave.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeLeave; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Swift_Message; class Leave extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct(private EmployeeLeave $leave) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.leave', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Leave Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; $isApprover = false; if($this->leave->validated == 1){ $title = "Your leave application has been received and validated by HR"; }else if($this->leave->validated == 99){ $title = "Your leave application has been denied by HR"; }else if($this->leave->status == 2){ $title = "Your leave application has been approved"; }else if($this->leave->status == 99){ $title = "Your leave application has been denied"; }else{ $title = $this->leave->employee->firstname . ' ' . $this->leave->employee->lastname." Submitted Leave Application"; $isApprover = true; } return [ 'leave_id' => $this->leave->id, 'status' => $this->leave->status, 'approved_at' => $this->leave->approved_at, 'message' => $this->message, 'title' => $title, 'url' => $isApprover ? 'attendance/leave-approval' : 'attendance/leave', 'created_by' => $this->leave->employee_id ]; } /** * Generate the message based on leave status. */ private function generateMessage(): string { $fullname = $this->leave->employee->firstname . ' ' . $this->leave->employee->lastname; $date_from = $this->leave->date_from; $date_to = $this->leave->date_to; $leave_type = $this->leave->leave_type->name; $created_at = Carbon::parse($this->leave->created_at)->setTimezone('Asia/Shanghai'); switch ($this->leave->status) { case 1: case 0: return "$fullname filed a $leave_type application dated \"$date_from\" to \"$date_to\" for your validation."; case 2: if($this->leave->validated == 1){ return "Your application for $leave_type dated \"$date_from\" to \"$date_to\" has been received and alidated by HR."; }else if($this->leave->validated == 99){ return "Your application for $leave_type dated \"$date_from\" to \"$date_to\" has been denied by HR."; }else{ return "Your application for $leave_type dated \"$date_from\" to \"$date_to\" has been approved."; } case 99: return "Your application for $leave_type dated \"$date_from\" to \"$date_to\" has been denied."; default: return 'Unknown status.'; } } } PK 3M�Z�F&�w w OffsetAvailment.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeOffset; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class OffsetAvailment extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeOffset $offsetAvailment) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.offset_availment', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Offset Availment Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ 'offset_availment_id' => $this->offsetAvailment->id, 'status' => $this->offsetAvailment->status, 'approved_at' => $this->offsetAvailment->approved_at, 'message' => $this->message, 'title' => ($this->offsetAvailment->status == 2) ? "Your offset availment application has been approved" : (($this->offsetAvailment->status == 99) ? "Your offset availment application has been denied" : $this->offsetAvailment->employee->firstname . ' ' . $this->offsetAvailment->employee->lastname." Submitted Offset Availment Application" ), 'url' => 'attendance/offset-approval', 'created_by' => $this->offsetAvailment->employee_id ]; } private function generateMessage(): string { $fullname = $this->offsetAvailment->employee->firstname.' '.$this->offsetAvailment->employee->lastname; $date = $this->offsetAvailment->date; $hours = $this->offsetAvailment->hours; switch ($this->offsetAvailment->status) { case 1: case 0: return $fullname.' filed offset availment application dated "'.$date. '" for "'.$hours.'".'; case 2: return 'Your offset availment dated "'.$date. '" for "'.$hours.'".'; case 99: return 'Your offset availment application dated "'.$date. '" for "'.$hours.'".'; default: return 'Unknown status.'; } } } PK 3M�Z4ʶ�� � Wfh.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeWfh; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class Wfh extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct(private EmployeeWfh $wfh) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.wfh', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('wfh Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; if($this->wfh->validated == 1){ $title = "Your wfh application has been received and validated by HR"; }else if($this->wfh->validated == 99){ $title = "Your wfh application has been denied by HR"; }else if($this->wfh->status == 2){ $title = "Your wfh application has been approved"; }else if($this->wfh->status == 99){ $title = "Your wfh application has been denied "; }else{ $title = $this->wfh->employee->firstname . ' ' . $this->wfh->employee->lastname." Submitted wfh Application"; } return [ 'wfh_id' => $this->wfh->id, 'status' => $this->wfh->status, 'approved_at' => $this->wfh->approved_at, 'message' => $this->message, 'title' => $title, 'url' => ($this->wfh->status == 2) ? 'attendance/wfh' : 'attendance/wfh-approval', 'created_by' => $this->wfh->employee_id ]; } private function generateMessage(): string { $fullname = $this->wfh->employee->firstname.' '.$this->wfh->employee->lastname; $date = $this->wfh->date; $hours = $this->wfh->hours; switch ($this->wfh->status) { case 1: case 0: return $fullname.' filed wfh application dated "'.$date. '" for '.$hours.' Hours for your validation.'; case 2: if($this->wfh->validated == 1){ return 'Your wfh application dated "'.$date. '" for '.$hours.' Hours has been received and validated by HR.'; }else if($this->wfh->validated == 99){ return 'Your wfh application dated "'.$date. '" for '.$hours.' Hours has been denied by HR.'; }else{ return 'Your wfh application dated "'.$date. '" for '.$hours.' Hours has been approved.'; } case 99: return 'Your wfh application dated "'.$date. '" for '.$hours.' Hours has been denied.'; default: return 'Unknown status.'; } } } PK 3M�Z98��� � OffsetEarning.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeOffsetEarning; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class OffsetEarning extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeOffsetEarning $offsetEarning) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.offset_earning', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Offset Earning Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ 'offset_availment_id' => $this->offsetEarning->id, 'status' => $this->offsetEarning->status, 'approved_at' => $this->offsetEarning->approved_at, 'message' => $this->message, 'title' => ($this->offsetEarning->status == 2) ? "Your offset earning application has been approved" : (($this->offsetEarning->status == 99) ? "Your offset earning application has been denied" : $this->offsetEarning->employee->firstname . ' ' . $this->offsetEarning->employee->lastname." Submitted Offset Earning Application" ), 'url' => 'attendance/offset-approval', 'created_by' => $this->offsetEarning->employee_id ]; } private function generateMessage(): string { $fullname = $this->offsetEarning->employee->firstname.' '.$this->offsetEarning->employee->lastname; $date = $this->offsetEarning->date; $hours = $this->offsetEarning->hours; switch ($this->offsetEarning->status) { case 1: case 0: return $fullname.' filed offset earning application dated "'.$date. '" for "'.$hours.'". hours'; case 2: return 'Your offset earning dated "'.$date. '" for "'.$hours.'" hours has been approved'; case 99: return 'Your offset earning application dated "'.$date. '" for "'.$hours.'" hours has been deniedd'; default: return 'Unknown status.'; } } } PK 3M�Z^־� � AsaMeeting.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeLeave; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Auth; use Swift_Message; class AsaMeeting extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct(private \App\Models\AsaMeeting $asaMeeting) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.asameeting', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject($this->asaMeeting->meeting_title); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $user = Auth::user(); $fullname = $user->first_name . ' ' . $user->last_name; return [ 'asa_meeting_id' => $this->asaMeeting->id, 'message' => $this->message, 'title' => $fullname.' invited you for a meeting', 'url' => 'meeting-calendar/calendar', 'created_by' => $this->asaMeeting->employee_id ]; } /** * Generate the message based on leave status. */ private function generateMessage(): string { $user = Auth::user(); $fullname = $user->first_name . ' ' . $user->last_name; return $fullname.' invited you for a meeting on '.$this->asaMeeting->start_datetime.' to '.$this->asaMeeting->end_datetime.'.'; } } PK 3M�Zs|�� � Undertime.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeUndertime; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class Undertime extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct(private EmployeeUndertime $undertime) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.undertime', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('Undertime Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ 'undertime_id' => $this->undertime->id, 'status' => $this->undertime->status, 'approved_at' => $this->undertime->approved_at, 'message' => $this->message, 'title' => ($this->undertime->status == 2) ? "Your undertime application has been approved" : (($this->undertime->status == 99) ? "Your undertime application has been denied" : $this->undertime->employee->firstname . ' ' . $this->undertime->employee->lastname." Submitted Undertime Application" ), 'url' => 'attendance/undertime', 'created_by' => $this->undertime->employee_id ]; } private function generateMessage(): string { $fullname = $this->undertime->employee->firstname.' '.$this->undertime->employee->lastname; $date = $this->undertime->date; $from_time = $this->undertime->from_time; $to_time = $this->undertime->to_time; switch ($this->undertime->status) { case 1: case 0: return $fullname.' filed undertime application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" for your validation.'; case 2: return 'Your undertime application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been approved.'; case 99: return 'Your undertime application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been denied.'; default: return 'Unknown status.'; } } } PK 3M�Z�c��� � Travel.phpnu �[��� <?php namespace App\Notifications; use App\Models\EmployeeOb; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class Travel extends Notification { use Queueable; private string $message; /** * Create a new notification instance. */ public function __construct( private EmployeeOb $ob) { $this->message = $this->generateMessage(); } /** * Get the notification's delivery channels. * * @return array<int, string> */ public function via(object $notifiable): array { return ['mail', 'database']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) ->view('emails.travel', [ 'headerImageUrl' => asset('images/AUTOHUB25_BANNER.png'), // URL of the image 'msg' => $this->message, 'notifiable' => $notifiable, ]) ->subject('OB/Travel Notification'); } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { $title = null; if($this->ob->validated == 1){ $title = "Your OB application has been received and validated by HR"; }else if($this->ob->validated == 99){ $title = "Your OB applicationn has been denied by HR"; }else if($this->ob->status == 2){ $title = "Your OB application has been approved"; }else if($this->ob->status == 99){ $title = "Your OB application has been denied "; }else{ $this->ob->employee->firstname . ' ' . $this->ob->employee->lastname." Submitted OB Application"; } return [ 'leave_id' => $this->ob->id, 'status' => $this->ob->status, 'approved_at' => $this->ob->approved_at, 'message' => $this->message, 'title' => $title, 'url' => 'attendance/official-business', 'created_by' => $this->ob->employee_id ]; } private function generateMessage(): string { $fullname = $this->ob->employee->firstname.' '.$this->ob->employee->lastname; $date = $this->ob->date; $from_time = $this->ob->from_time; $to_time = $this->ob->to_time; switch ($this->ob->status) { case 1: case 0: return $fullname.' filed ob application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" for your validation.'; case 2: if($this->ob->validated == 1){ return 'Your ob application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been received and validated by HR.'; }else if($this->ob->validated == 99){ return 'Your ob application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been denied by HR.'; }else{ return 'Your ob application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been approved.'; } case 99: return 'Your ob application dated "'.$date. '" time from "'.$from_time.'" to "'.$to_time.'" has been denied.'; default: return 'Unknown status.'; } } } PK �N�Z��թg g NotifiableUser.phpnu ȯ�� <?php namespace App\Notifications; use Illuminate\Notifications\Notifiable; //another class handle input param email class NotifiableUser { use Notifiable; public $email; public function __construct($email) { $this->email = $email; } public function routeNotificationForMail() { return $this->email; } } PK �N�Z��PW W EmailNotification.phpnu ȯ�� <?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; class EmailNotification extends Notification implements ShouldQueue { use Queueable; protected $message ; // protected $contentDtl; // protected $subject; /** * Create a new notification instance. */ // public function __construct($message,$contentDtl) public function __construct($message) { // $this->project= $project; // $this->contentDtl = $contentDtl; $this->message = $message; } /** * Get the notification's delivery channels. * * @return array<int, string> */ // public function via(object $notifiable): array //for object usermodel public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. */ // public function toMail(object $notifiable): MailMessage public function toMail($notifiable): MailMessage { return (new MailMessage) ->subject($this->message['subject']) ->markdown('email.custom-prf', [ 'greeting' => $this->message['greeting'], 'body' => $this->message['body'], 'actionLabel' => $this->message['actionLabel'], 'link' => $this->message['link'], 'footer' => $this->message['footer'], ]); // ->greeting($this->message['greeting']) // // ->from(env('MAIL_USERNAME'), 'AutohubAdmin@PRF') // ->from(config('mail.from.address'), config('mail.from.name')) // ->line($this->message['body']) // // ->line($this->contentDtl) // ->line($this->message['footer']) // ->action($this->message['actionLabel'], $this->message['link']) // ->salutation("Regards,\nAutohub Admin PRF"); // <- CUSTOM FOOTER HERE } /** * Get the array representation of the notification. * * @return array<string, mixed> */ public function toArray(object $notifiable): array { return [ // 'subject' => $this->subject,//add this param if you want to get frm $request->input // 'contentDtl' => $this->contentDtl, 'message' => $this->message, ]; } } PK 3M�ZJ�P P Overtime.phpnu �[��� PK 3M�Z�$ e� � � BiometricConnection.phpnu �[��� PK 3M�Z��� � { JobApplication.phpnu �[��� PK 3M�Z� 东 � �# TimeAdjustment.phpnu �[��� PK 3M�Zx�8�� � ~3 Mrf.phpnu �[��� PK 3M�Zt�)1w w x>